package pers.cz.io;

import pers.cz.log.LogUtils;

import java.net.URL;

/**
 * @program: PostGirl-panent
 * @description: 资源加载器，通过路径加载资源
 * @author: Cheng Zhi
 * @create: 2022-06-29 17:37
 **/
public class ResourceLoader {

    public Resource loadResource(String location) {

        URL url = this.getClass().getClassLoader().getResource(location);
        LogUtils.info("JEF is using config file ：" + url.getPath());
        return new UrlResource(url);
    }
}
